﻿using System.Collections.Generic;
using System;
using WorkFlowCore.WorkTasks;

namespace WorkFlowCore.Host.ViewModels.WorkFlowCore
{
    public class ForecastNodeUserOutput
    {
        /// <summary>
        /// 节点id
        /// </summary>
        public Guid NodeId { get; set; }
        /// <summary>
        /// 节点名称
        /// </summary>
        public string NodeName { get; set; }
        /// <summary>
        /// 所有相关用户
        /// </summary>
        public List<ForecastUserDto> Users { get; set; }
        /// <summary>
        /// 审批用户
        /// </summary>
        public List<ForecastUserDto> HandleUsers { get; set; }
        /// <summary>
        /// 抄送用户（只读）
        /// </summary>
        public List<ForecastUserDto> ReadOnlyUsers { get; set; }
        /// <summary>
        /// 层级（用于前端排序）
        /// </summary>
        public int Level { get; set; }
        /// <summary>
        /// 处理方式
        /// </summary>
        public WorkStepHandleType? HandleType { get; set; }
        /// <summary>
        /// 是否等待所有人处理（默认为否）
        /// </summary>
        public bool IsWaitingAllUser { get; set; }
    }

    public class ForecastUserDto
    {
        /// <summary>
        /// 用户id
        /// </summary>
        public string Id { get; set; }
        /// <summary>
        /// 用户名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 处理方式
        /// </summary>
        public WorkStepHandleType? HandleType { get; set; }
        /// <summary>
        /// 阶段类型
        /// </summary>
        public WorkStepType WorkStepType { get; set; }
        /// <summary>
        /// 批文
        /// </summary>
        public string Comment { get; set; }
        /// <summary>
        /// 附件资源id，多个之间  , 隔开
        /// </summary>
        public string ResourceIds { get; set; }
        /// <summary>
        /// 处理时间
        /// </summary>
        public DateTime HandlerTime { get; set; }
    }
}
